<?php

session_start ();
require_once 'lib/sql.php';
$sql = new Sql ();
$rs = @mysql_query ( "select * from sanpham " );
$count = mysql_num_rows ( $rs );
mysql_free_result ( $rs );
$page1 = 1;
if (isset ( $_GET ['page'] )) {
   $page1 = $_GET ['page'];
}
$count1 = $count - $page1 * 9;
if ($count1 > 9)
   $count1 = 9;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Mobile Shop</title>

<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function ajax(id) {
	if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); }
	else { xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }

	xmlhttp.open("GET","action/card.php?id="+id,true);
	xmlhttp.send();
	xmlhttp.onreadystatechange=function()
	  { if (xmlhttp.readyState==4 && xmlhttp.status==200) {
	  document.getElementById("cardsp").innerHTML=xmlhttp.responseText;

	 } }
	}
</script>
</head>

<body>
<table width="100%" border="1">
<thead>
  <tr align="center">
    <td width="5%" align="center">STT</td>
    <td width="40%">Tên Sản Phẩm</td>
    <td width="20%" align="center" valign="middle">Image</td>
    <td width="10%" align="center">Số Lượng</td>
    <td width="10%">Giá</td>
    <td width="15%">Tổng</td>
  </tr>
  </thead>
  <tfoot>
  <tr align="center">
    <td width="5%" align="center">STT</td>
    <td width="40%">Tên Sản Phẩm</td>
    <td width="20%" align="center" valign="middle">Image</td>
    <td width="10%" align="center">Số Lượng</td>
    <td width="10%">Giá</td>
    <td width="15%">Tổng</td>
  </tr>
  </tfoot>
  <tbody>
  <tr>
    <td width="5%" align="center">1</td>
    <td width="40%">ASUS ZEN 5</td>
    <td width="20%" align="center" valign="middle"><img src="data/thumb_26510_1.jpg" width="100" height="100" alt="" /></td>
    <td width="10%" align="center"><label for="textfield"></label>
      <input name="textfield" type="text" id="textfield" size="10" /></td>
    <td width="10%" align="right">2.500.000 VNĐ</td>
    <td width="15%" align="right">2.500.00 VNĐ</td>
  </tr>
  </tbody>
</table>
</body>
</html>
